
<!DOCTYPE html>
<html lang="en">
<head>
    <title>{$title}</title>

    <!-- Meta tag Keywords -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false);
    function hideURLbar(){ window.scrollTo(0,1); } </script>
    <!-- Meta tag Keywords -->

    <!-- css files -->
    <link href="/static/home/css/style.css" rel="stylesheet" type="text/css" media="all" />
    <link href="/static/home/css/font-awesome.css" rel="stylesheet">
    <link rel="stylesheet" href="/static/home/css/toastr.min.css">
    <link rel="stylesheet" href="/static/home/css/bootstrap.css">
    <link rel="stylesheet" href="/static/home/css/bootstrap-theme.css">
    <!-- Font-Awesome-Icons-CSS -->

</head>
<body>
<!-- main -->
<div class="main">
    <canvas id="myCanvas"></canvas>
    <div class="main-w3l">
        <h1 class="logo-w3">美食的俘虏商家平台</h1>
        <div class="w3layouts-main">
            <h2>现在登录</h2>
            <form action="{:url('home/login/log')}" method="post">
                <input placeholder="用户名" name="username" id="v" type="text" required="" >
                <span class="icons i1"></span>
                <input placeholder="密码" name="pwd" id="c" type="password" required="">
                <span class="icons i2"></span>
                <!--<input type="submit" value="点击获取" class="btn">-->
                <!--<a href="{:url('home/login/mail')}">发送邮件地址</a>-->
                <input type="submit" value="登录" name="login">
            </form>
            <!--<h6><a href="#">忘记密码?</a></h6>-->
            <!--<h3>(or)</h3>-->
        </div>
        <div class="w3layouts-main2">
            <h3>申请注册</h3>
            <form action="{:url('home/login/save')}" method="post">
                <input placeholder="公司名" name="name" id="name" type="text" required="">
                <span class="icons i3"></span>
                <input placeholder="登录名" name="username" id="username" type="text" required="">
                <span class="icons i3"></span>
                <input placeholder="电话" name="tel" id="tel" type="text" required="">
                <span class="icons i4"></span>
                <input placeholder="QQ" name="qq" id="qq" type="text" required="">
                <span class="icons i5"></span>
                <input placeholder="邮箱" name="email" id="email" type="text" required="">
                <span class="icons i6"></span>
                <input placeholder="地址" name="address" id="address" type="text" required="">
                <span class="icons i6"></span>
                <input placeholder="密码" name="pwd" id="pwd" type="password" required="">
                <span class="icons i6"></span>
                <input placeholder="确认密码" name="rpwd" id="rpwd" type="password" required="">
                <span class="icons i6"></span>
                <input type="submit" value="注册" name="register">
            </form>
        </div>
        <div class="clear"></div>
        <!-- //main -->

        <!--footer-->

        <!--//footer-->
    </div>
</div>


<!--scripts-->

<!-- js -->
<script type="text/javascript" src="/static/home/js/jquery-2.1.4.min.js"></script>
<!-- //js -->
<!-- particles-JavaScript -->
<script src="/static/home/js/jquery.min.js"></script>
<script src="/static/home/js/particles.min.js"></script>
<script src="/static/home/js/toastr.min.js"></script>
<script src="/static/home/js/bootstrap.min.js"></script>

<script>
//    待修改手机短信
$(function() {
    $('.btn').click(function () {
        var phone = $('#v').val();
        alert(phone);
        $.ajax({
            type : 'post',
            url : '/home/login/phone/',
            data : {'phone': phone},
            success : function(data){
                console.log(data.info);
//                alert(data);
                if (data.status){
                    toastr.success(data.info);

                }else {
                    toastr.error(data.info,'警告')
                }
            },
            error : function(data){
//                console.log(data.info);
//                alert(da);
            }
        });
    });
});
// 设置弹框参数
toastr.options = {
    closeButton: true,// 是否显示关闭按钮
    progressBar: true,// 实现显示计时条
    timeOut: "3000",// 自动关闭时间
    positionClass: "toast-top-right"// 提示位置
    // positionClass: "toast-top-full-width"// 提示位置
//         toast-top-full-width 顶端，宽度铺满整个屏幕
    // toast-top-right  顶端右边
};
    window.onload = function() {
        Particles.init({
            selector: '#myCanvas',
            color: '#eba7a7',
            connectParticles: true,
            minDistance: 90
        });
    };
</script>

<!-- //particles-JavaScript -->
<!--//scripts-->


</body>
</html>
